package com.parking.mgr.useraccount.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.parking.mgr.useraccount.model.entity.UserAccountEntity;
import com.parking.mgr.useraccount.model.param.UserAccountParam;

import javax.servlet.http.HttpServletRequest;

/**
 * @ClassName UserAccountService
 * @Description 用户账号service
 * @Auther: zhijianpu
 * @Date: 2023/5/25
 */
public interface UserAccountService extends IService<UserAccountEntity> {

    /**
     * 根据账号查询是否有重名
     *
     * @param userAccountParam
     * @return
     */
    Long countByAccount(UserAccountParam userAccountParam);

    /**
     * 增加用户账户信息
     *
     * @param passportId
     * @param account
     */
    void addUserAccount(String passportId, String account);

    /**
     * 删除用户账户
     * @param passportId
     */
    void deleteAccountByPassportId(String passportId);

    /**
     * 增加或更新用户账号
     *
     * @param userAccountParam
     */
    void  saveOrUpdateUserAccount(UserAccountParam userAccountParam);
}
